<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/token.jsp"%>
<%@ include file="/common/label.jsp"%>
<%
	String categorys = input.getDesc("categorys", "44").replaceAll("\\|", ",");
	System.out.println(categorys);
	List<Map> list = QBuilder.db("basedb").select("new map(lr.targetId as target_id, l.category as category)").from("LabelRelation as lr, Label as l").where(new Where("lr.hospital=", hospital).and("lr.status=", STATUS_ENABLE).and("lr.labelId in(" + categorys + ")").and("l.id=lr.targetId")).query().getResultObj();
	for (Map map:list) {
		Integer labelid = (Integer)map.get("target_id");
		Integer category = (Integer)map.get("category");
		OperateHistory oh = OperateHistory.fromMap(parameters, OperateHistory.class);
		oh.setOid(labelid + "");
		oh.setUid(token.getUid() + "");
		oh.setCategory(LABEL_CATEGORY);
		oh.setOperate(ATTENTION);
		operate(oh, false);
	}
	msg.put("data", list);
    Tools.encryptPrint(out, msg);
%>